using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using UwinEducation.Domain.Entities;
using UwinEducation.Shared.Models;

namespace UwinEducation.Domain.IRepositories
{
    /// <summary>
    /// 订单详情仓储接口
    /// </summary>
    public interface IOrderDetailRepository : IRepository<OrderDetail, Guid>
    {
        /// <summary>
        /// 获取订单的所有详情
        /// </summary>
        /// <param name="orderId">订单ID</param>
        /// <returns>订单详情列表</returns>
        Task<List<OrderDetail>> GetByOrderIdAsync(Guid orderId);

        /// <summary>
        /// 根据教师课表ID获取订单详情
        /// </summary>
        /// <param name="teacherScheduleId">教师课表ID</param>
        /// <returns>订单详情列表</returns>
        Task<List<OrderDetail>> GetByTeacherScheduleIdAsync(Guid teacherScheduleId);

        /// <summary>
        /// 批量添加订单详情
        /// </summary>
        /// <param name="orderDetails">订单详情列表</param>
        Task AddRangeAsync(List<OrderDetail> orderDetails);

        /// <summary>
        /// 批量删除订单详情
        /// </summary>
        /// <param name="orderDetails">订单详情列表</param>
        Task DeleteRangeAsync(List<OrderDetail> orderDetails);

        /// <summary>
        /// 根据订单ID、学生ID和教师课表ID获取订单详情
        /// </summary>
        /// <param name="orderId">订单ID</param>
        /// <param name="studentId">学生ID</param>
        /// <param name="teacherScheduleId">教师课表ID</param>
        /// <returns>订单详情</returns>
        Task<OrderDetail> GetByOrderIdAndStudentIdAndTeacherScheduleIdAsync(Guid orderId, Guid studentId, Guid teacherScheduleId);

        /// <summary>
        /// 分页查询订单详情
        /// </summary>
        /// <param name="request">分页请求</param>
        /// <returns>分页结果</returns>
        Task<PagedResult<OrderDetail>> GetPagedAsync(OrderDetailPageRequest request);
        /// <summary>
        /// 根据学生ID获取订单详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<OrderDetail>> GetByStudentIdAsync(Guid id);
    }
} 